<template>
  <div>
    <el-dialog :title="'确定要退课' + courseName +'?'" v-dialog-drag :visible.sync="dropClassFormVisible">
      <p>您的这个课程的任何信息或评论将被永久删除</p>
      <p class="font-color-warning">警告：此操作无法撤销</p>
      <el-form :model="dropClassForm">
        <el-form-item label="活动名称" :label-width="formLabelWidth">
          <el-input v-model="dropClassForm.pass" autocomplete="off" placeholder="请输入登录密码验证"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <div class="footer-left">
          <p>忘记密码?</p>
          <p>可前往</p>
          <span>账号设置</span>
          <p>处修改</p>
        </div>
        <div class="footer-right">
          <el-button @click="dropClassFormVisible = false">取 消</el-button>
          <el-button type="primary" @click="dropClassFormVisible = false">退课</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dropClassFormVisible: false,
      dropClassForm: {
        pass: ''
      },
      backFileFormVisible: false,
      formLabelWidth: '120px',
    }
  },
  props: ['courseName'],
  mounted() {
    this.$bus.$on('dropClass', (data) => {
      console.log(data)
      this.dropClassFormVisible = data
    })
  },
  watch: {
    // dropClassFormVisible() {
    //   this.$bus.$on('dropClass', (data) => {
    //     console.log(data)
    //     this.dropClassFormVisible = data
    //   })
    // }
  }
}
</script>

<style scoped>
.font-color-warning {
  color: #ff941f;
}

.footer-left {
  font-size: 16px;
  display: flex;
}

.footer-left span {
  color: rgb(66, 133, 244);
  cursor: pointer;
  outline: none;
}
</style>
